//
//  NewCityWinHomeCell.swift
//  XiaoJingMallSwift
//
//  Created by beisheng03 on 2017/9/13.
//  Copyright © 2017年 beisheng. All rights reserved.
//

import UIKit

class NewCityWinHomeCell: BaseTableViewCell {
    @IBOutlet weak var bgImageView: UIImageView!
    @IBOutlet weak var inditorView: UIActivityIndicatorView!
    
    @IBOutlet weak var leftLabel: UILabel!
    
    @IBOutlet weak var middleLabel: UILabel!
    
    var model : OneItemModel?{
    
    
        didSet{
        
            if model == nil{
            
            return
            }
            
            
            inditorView.startAnimating()
            
            bgImageView.sd_setImage(with: URL(string: model!.gc_image), placeholderImage: UIImage.defaulImage(), options: []) { (image, _, _, _) in
                self.inditorView.stopAnimating()
                self.bgImageView.contentMode = .scaleAspectFit
                
            }
            
            leftLabel.text = model?.gc_name
            
            middleLabel.text = model?.gc_description

        
        
        
        }
    
    
    
    }

    override func awakeFromNib() {
        super.awakeFromNib()
        contentView.backgroundColor = UIColor.white
        middleLabel.textColor = UIColor.dakGray()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
}
